<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Channel extends Model
{
    protected $fillable = [
        'code','no','channel_provider_id','channel_provider_name',
        'cooperation','target','start_date','end_date',
        'contract_type','contract_amount','real_amount','expections',
        'check_status','open_status','settlement_status','mark'
    ];
    public function __get($name){
        if($name == 'channel_code'){
            return $this->code . $this->no;
        }
        return parent::__get($name);
    }
}
